#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "WriteVariableAction.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class InputPin;

/// <summary>
/// RemoveVariableValueAction
/// A RemoveVariableValueAction is a WriteVariableAction that removes values from a
/// Variables.
/// </summary>
class UMLMODEL_EXPORT RemoveVariableValueAction : public WriteVariableAction {

public: // Constructors and destructors
    explicit RemoveVariableValueAction(const QString& umlType="uml::RemoveVariableValueAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// isRemoveDuplicates getter
    /// Specifies whether to remove duplicates of the value in nonunique Variables.
    /// </summary>
    bool isRemoveDuplicates() const;

    /// <summary>
    /// isRemoveDuplicates setter
    /// Specifies whether to remove duplicates of the value in nonunique Variables.
    /// </summary>
    void setIsRemoveDuplicates(bool value);

    /// <summary>
    /// removeAt getter
    /// An InputPin that provides the position of an existing value to remove in
    /// ordered, nonunique Variables. The type of the removeAt InputPin is
    /// UnlimitedNatural, but the value cannot be zero or unlimited.
    /// </summary>
    shared_ptr<InputPin> removeAt() const;

    /// <summary>
    /// removeAt setter
    /// An InputPin that provides the position of an existing value to remove in
    /// ordered, nonunique Variables. The type of the removeAt InputPin is
    /// UnlimitedNatural, but the value cannot be zero or unlimited.
    /// </summary>
    void setRemoveAt(shared_ptr<InputPin> value);

private: // Fields
    /// <summary>
    /// isRemoveDuplicates
    /// Specifies whether to remove duplicates of the value in nonunique Variables.
    /// </summary>
    const static bool isRemoveDuplicates_default_;
    bool isRemoveDuplicates_= isRemoveDuplicates_default_;

    /// <summary>
    /// removeAt
    /// An InputPin that provides the position of an existing value to remove in
    /// ordered, nonunique Variables. The type of the removeAt InputPin is
    /// UnlimitedNatural, but the value cannot be zero or unlimited.
    /// </summary>
    shared_ptr<InputPin> removeAt_;

};

} // namespace uml
